"""
@version:python3
@author:ll
@file:作业3 tail -f access.log程序实现.py
@time:2022/1/19 20:00
"""
import time
with open("access.log",mode = "rb") as f:
    f.seek(0,2)

    while True:
        res = f.readline()
        if res == 0:
            time.sleep(0.3)
        else:
            print(res.decode("utf-8"),end="")